<%--
  ~ Copyright (c) 2005, 2014 vacoor
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  --%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title></title>
</head>
<body>

</body>
</html>


<!doctype html>
<html>
<head>
    <meta charset="gbk" />
    <title>天猫</title>
</head>
</html>
<script  type="text/javascript">
    var login_indicator={unitPrefix:''};
    var win = window, doc = document,host = window.location.hostname;
    var urls = (function(){
        var url = win.location.href.split('?')[1] || "";
        var params = {};
        var arr = {},i,j;
        url = url.replace(/#.*$/,'').split("&");
        for(i=0,j=url.length;i<j;i++){
            var num = url[i].indexOf("=");
            if (num>0){
                var key = decodeURIComponent(url[i].substring(0, num));
                var val = url[i].substr(num + 1)||"";
                try {
                    val = decodeURIComponent(val);
                }catch (ex) {
                }
                params[key] = val;
            }
        }
        return params;
    })();

    var XDomain = function(){
        return {
            doAgent : function(params){
                var mainCaller;
                win.name = 'x-callee';
                mainCaller = win.parent.parent;
                function resetFrameHeight(oFrame,ht,wh){
                    try{
                        var oDiv= mainCaller.document.getElementById(oFrame)
                        oFrame = oDiv.getElementsByTagName("iframe")[0];
                        oFrame.setAttribute('height',ht || oFrame.getAttribute('height'));
                        oFrame.setAttribute('width',wh || oFrame.getAttribute('width'));
                        oDiv.style.height=(ht || oFrame.getAttribute('height')).replace("px","")+"px"
                        oDiv.style.width=(wh || oFrame.getAttribute('width')).replace("px","")+"px"
                    }catch(e){}
                }
                function closePanel(oPanel){
                    try{
                        oPanel = mainCaller.document.getElementById(oPanel);
                        if(!oPanel) return;
                        oPanel.style.display = 'none';
                    }catch(e){}
                }
                switch(params.method){
                    case 'heightReset' :
                        resetFrameHeight(params['frameId'],params['height'],params['width']);
                        break;
                    case 'panelClose' :
                        closePanel(params['panelId']);
                        break;
                    default :
                        break;
                }
            }
        };
    }();

    if(/\.tmall\./.test(host)){
        doc.domain =  "tmall."+ host.split(".tmall.")[1];
    }else{
        var arr = host.split(".");
        doc.domain = arr.splice((arr.length - 2) > 0 ? arr.length - 2 : 0, 2).join(".");
    }

    try{
        parent.onDomainAgentChange(this);
    }catch(e){
        try{
            parent.parent.onDomainAgentChange(this)
        }catch(e){
            XDomain.doAgent(urls);
        }
    }
</script>
